package opp.arrayadd;

public class arraySum {
    public static void main(String[] args) {
        //二维数组遍历求和
        int[][]arr={{1,5,9},{2,4,6,8,10},{5,100,-130}};
        int sum=0;
        for(int i=0;i<arr.length;i++)
        {
            for(int j=0;j<arr[i].length;j++)
            {
                sum+=arr[i][j];
            }

        }
        System.out.println("sum="+sum);

    }
}
